package graduate.wangyaqi.OnlyQuestions;

import org.springframework.data.repository.CrudRepository;

import java.util.Optional;

public interface OnlyQuestionsRepository extends CrudRepository<OnlyQuestions,Long> {
    Iterable<OnlyQuestions> findAllByTaotiID(long taotiID);

    @Override
    Optional<OnlyQuestions> findById(Long aLong);

    int countAllByTaotiID(Long taotaoId);

    OnlyQuestions getFirstByTaotiIDAndIdGreaterThan(long taotiId,long id);

    OnlyQuestions getFirstByTaotiIDAndIdLessThanOrderByIdDesc(long taotiId,long id);
}
